<html><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>ExamineRegularExpression</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="4">ExamineRegularExpression()</font></b></p>
<p><b>Syntax</b></p><blockquote>

Result = <font color="#006666"><b>ExamineRegularExpression</b></font>(#RegularExpression, String$)</blockquote>

</blockquote>
<b>Description</b><br><blockquote>



Starts matching the #RegularExpression against the given String$. Individual 
matches can be iterated using the <a href="nextregularexpressionmatch.html">NextRegularExpressionMatch()</a> function. 
From each match, the matching string, its position/length and any groups within 
the match can be extracted with the appropriate function. 

 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>#RegularExpression</i></td>
<td width="90%"> 
 
The regular expression to use. 

 

</td></tr>
<tr><td><i>String$</i></td>
<td> 
 
The string to apply the regular expression on. 

 

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>



Returns non-zero if the matching was started successfully. Whether an actual match 
was found can be determined by calling <a href="nextregularexpressionmatch.html">NextRegularExpressionMatch()</a>. 

 

</blockquote><p><b>Example</b></p><blockquote>

<pre><font face="Courier New, Courier, mono"size="2">  <font color="#006666">; This expression will match every word of 3 letter which begin by a lower case letter,</font>
  <font color="#006666">; followed with the character 'b' and which ends with an uppercase letter. ex: abC</font>
  <font color="#006666">; Each match is printed with its position in the original string.</font>
  <font color="#006666">;    </font>
  <b><font color="#006666">If</font></b> <font color="#006666">CreateRegularExpression</font>(0, "[a-z]b[A-Z]")
    <b><font color="#006666">If</font></b> <font color="#006666">ExamineRegularExpression</font>(0, "abC ABc zbA abc")
      <b><font color="#006666">While</font></b> <font color="#006666">NextRegularExpressionMatch</font>(0)
        <b><font color="#006666">Debug</font></b> "Match: " +<font color="#006666"> RegularExpressionMatchString</font>(0)
        <b><font color="#006666">Debug</font></b> "    Position: " +<font color="#006666"> Str</font>(<font color="#006666">RegularExpressionMatchPosition</font>(0))
        <b><font color="#006666">Debug</font></b> "    Length: " +<font color="#006666"> Str</font>(<font color="#006666">RegularExpressionMatchLength</font>(0))
      <b><font color="#006666">Wend</font></b>
    <b><font color="#006666">EndIf</font></b>
  <b><font color="#006666">Else</font></b>
    <b><font color="#006666">Debug</font></b> <font color="#006666">RegularExpressionError</font>()
  <b><font color="#006666">EndIf</font></b>
</font></pre>

</blockquote><p><b>See Also</b></p><blockquote>

<a href="nextregularexpressionmatch.html">NextRegularExpressionMatch()</a>, 
<a href="regularexpressionmatchstring.html">RegularExpressionMatchString()</a>, <a href="regularexpressionmatchposition.html">RegularExpressionMatchPosition()</a>, <a href="regularexpressionmatchlength.html">RegularExpressionMatchLength()</a> 

</Blockquote><p><b>Supported OS  </b><Blockquote>All</Blockquote></p><center>&lt;- <a href=createregularexpression.html>CreateRegularExpression()</a> - <a href=index.html>RegularExpression Index</a> - <a href=extractregularexpression.html>ExtractRegularExpression()</a> -&gt;



</body></html>